<template>
	<view class="page">
		<view class="nav_bar nav"
			:style="`background: url(${$util.prefix('auth/store_auth_nav_bg.png')}) 0 0 no-repeat;`">
			<uni-nav-bar color="#333" left-icon="left" title="" :border='false' :fixed="true"
				background-color="transparent" @clickLeft="$native.backAction()">
				<view class="nav_tab">
					<u-tabs :list="list" @click="onTab" :scrollable="false" lineColor="#FD2A53" 
						:inactiveStyle="{
							color: '#131313',
							fontWeight: 'bold',
							fontSize:'32rpx'
						}"
						:activeStyle="{
							color: '#131313',
							fontWeight: 'bold',
							fontSize:'32rpx'
						}"
					>
					</u-tabs>
				</view>
			</uni-nav-bar>
		</view>

		<view class="nav_box"></view>
		
		<view class="content">
			<view class="block" v-if="type == 1 && circle_id">
				<operationEval ref="operationEval" :circle_id="circle_id"></operationEval>
			</view>
		</view>
		
	</view>
</template>

<script>
	import operationEval from './components/operationEval.vue';
	export default {
		
		components: {
			operationEval
		},
		
		data() {
			return {
				type: 1,
				list: [{
					name: '评论',
					type: 1,
				}, {
					name: '审核',
					type: 2,
				}],
				
				circle_id: 0,
			}
		},
		
		methods: {
			onTab(e){
				this.type = e.type;
			},
			
		},
		
		onLoad(option) {
			if (option.token) {
				uni.setStorageSync('token', option.token);
				uni.setStorageSync('cid', option.cid);
				uni.setStorageSync('terminal', option.terminal);
			}
			this.circle_id = Number(`${option.circle_id}`);
		},
		
		onReachBottom() {
			if(this.type == 1){
				this.$refs.operationEval.reachBottom();
			}
		}
		
	}
</script>

<style lang="less" scoped>
	.nav {
		background-size: 100%;
		.nav_tab {
			width: 100%;
		}
	}
</style>